import CommonPanel from './CommonPanel';
import {wrapperType, EnumControlType, ITabsFields, layouts, ITabPanel} from "@/pages/dv/constants/EnumCommon";
import EnumFieldsConfig from './EnumFieldsConfig';

export default class Link extends CommonPanel{

  /**
   * 基础配置枚举
   */
  getPrivatePanes(): ITabPanel[] {
    return [
      {title: '常用', value: 'Link', fields: this.otherConfig()},
      {title: '样式', value: 'style', fields: EnumFieldsConfig.style()},
    ]
  }
  otherConfig(): ITabsFields[]{
    return [
      {
        formItemProps: {
          name: 'text',
          label: '文本内容'
        },
        layout: layouts.vertical,
        controlType: EnumControlType.TextArea,
      },
      {
        formItemProps: {
          name: 'href',
          label: '网址链接'
        },
        layout: layouts.vertical,
        controlType: EnumControlType.TextArea,
      },
      {
        formItemProps: {
          name: 'target',
          label: '规定在何处打开链接文档'
        },
        layout: layouts.vertical,
        controlType: EnumControlType.RadioGroup,
        data: [
          {label: '_blank', value: '_blank'},
          {label: '_parent', value: '_parent'},
          {label: '_self', value: '_self'},
          {label: '_top', value: '_top'},
          {label: 'framename', value: 'framename'},
          {label: 'view_window', value: 'view_window'},
          {label: 'view_frame', value: 'view_frame'},
        ]
      },
    ]
  }
}
